﻿using Dqs_BLL;
using Model;
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Dqs_UI
{
	public partial class frmAdmin : UIForm
	{
		public frmAdmin(AdminInfo adminInfo)
		{
			InitializeComponent();
			this._adminInfo = adminInfo;
		}

		private Test_BLL _test_BLL = new Test_BLL();
		private AdminInfo _adminInfo { get; set; }

		/// <summary>
		/// 测试数据
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnInitData_Click(object sender, EventArgs e)
		{
			_test_BLL.InitializeData();
		}

		private Admin_BLL admin_BLL = new Admin_BLL();


		private void frmAdmin_Load(object sender, EventArgs e)
		{
			lblAdminInfo.Text = "你好，" + _adminInfo.FullName + "管理员";
		}

		private void btnStudent_Click(object sender, EventArgs e)
		{
			frmAdmin_Student frmAdmin_Student = new frmAdmin_Student();
			frmAdmin_Student.ShowDialog(this);
		}

		

		private void uiButton3_Click(object sender, EventArgs e)
		{
			frmAdmin_Teacher frmAdmin_Teacher = new frmAdmin_Teacher();
			frmAdmin_Teacher.ShowDialog(this);
		}

		private void uiButton4_Click(object sender, EventArgs e)
		{
			frmAdmin_Admin frmAdmin_Admin = new frmAdmin_Admin();
			frmAdmin_Admin.ShowDialog(this);
		}

		private void uiButton5_Click(object sender, EventArgs e)
		{
			frmAdmin_Class frmAdmin_Class = new frmAdmin_Class();
			frmAdmin_Class.ShowDialog(this);
		}

		private void uiButton6_Click(object sender, EventArgs e)
		{
			frmAdmin_Course frmAdmin_Course = new frmAdmin_Course();
			frmAdmin_Course.ShowDialog(this);
		}


		/// <summary>
		/// 注销操作
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void uiButton1_Click(object sender, EventArgs e)
		{
			DialogResult = DialogResult.OK;
		}
	}
}
